﻿using RssReader.Storage;

namespace RssReader.Feeds
{
    public class UrlHelper
    {
        readonly LocalSettings _localSettings = new LocalSettings();
        
        private string urlKey = "url";
        

        public string Get_url()
        {
            var url = _localSettings.Get_value(urlKey);
            //string uriString =
            //        "http://www.google.com/reader/public/atom/user%2F10937322286897482447%2Fbundle%2FZubair%27s%20Feed%20Bundle";
            string uriString = "http://news.yahoo.com/rss/";
            if (url != null) uriString = url.ToString();

            return uriString;
        }

        public void Put_url(string url)
        {
            _localSettings.Store_value(urlKey, url);
        }

        public void Delete_url()
        {
            _localSettings.Remove_setting(urlKey);
        }
    }
}
